//
//  File.swift
//
//
//  Created by didi on 2022/9/13.
//

import MolecularObjects
import Vapor

public extension ObjectModel {
    static var pathIdComponent: PathComponent {
        .init(stringLiteral: ":" + pathIdKey)
    }

    static func getIdParameter(_ req: Request) -> UUID? {
        req.parameters.get(pathIdKey)?.uuid
    }
}
